import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
import Layout from '../components/Layout.vue';
import frameIn from './frameIn';
import frameOut from './frameOut';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    component: Layout,
    redirect: '/index', // 当用户访问根路径的时候会被重定向到 首页(/index)
    children: [...frameIn],
  },
  ...frameOut,
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
